<%= alchemy_form_for @tag, as: 'tag', url: alchemy.admin_tag_path(@tag), html: {method: 'patch'} do |f| %>
  <%= render_message :info do %>
    <%= Alchemy.t(:you_can_rename_this_tag) %>
  <% end %>
  <%= f.input :name %>
  <%= f.submit Alchemy.t(:rename) %>
<% end %>
<% if @tags.any? -%>
  <%= alchemy_form_for @tag, as: 'tag', url: alchemy.admin_tag_path(@tag), html: {method: 'patch'} do |f| %>
    <%= render_message :info do %>
      <%= Alchemy.t(:or_replace_it_with_an_existing_tag) %>
    <% end %>
    <div class="input tags">
      <label class="control-label"><%= Alchemy.t('Tags') %></label>
      <div class="control_group" id="tags_tag_list">
        <%= js_filter_field '.tag-list li' %>
        <ul class="tags tag-list">
          <%= render partial: "radio_tag", collection: @tags, locals: {name: "tag"} %>
        </ul>
      </div>
    </div>
    <%= f.submit Alchemy.t(:replace) %>
  <% end %>
<% end %>
